<div class="page-body">
    <div class="row">
        <div class="col-lg-3 col-sm-3 col-xs-12">
            <h5 class="row-title"><i class="typcn typcn-lightbulb"></i>借阅设置</h5>
            <div class="well">
                <div class="dd dd-draghandle bordered form-horizontal">
                    <div class="form-group">
                        <label for="rentmax_wx" class="col-sm-4 control-label no-padding-right">微信借阅上限</label>
                        <div class="col-sm-8">
                            <input type="number" class="form-control" id="rentmax_wx" placeholder="Enter" value="{:C('rentmax_wx')}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="rentmax_md" class="col-sm-4 control-label no-padding-right">门店借阅上限</label>
                        <div class="col-sm-8">
                            <input type="number" class="form-control" id="rentmax_md" placeholder="Enter" value="{:C('rentmax_md')}">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <a href="javascript:void(0);" class="btn btn-darkorange" onclick="save_rent()">保存</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="col-lg-3 col-sm-3 col-xs-12">
            <h5 class="row-title"><i class="typcn typcn-lightbulb"></i>名称设置</h5>
            <div class="well">
                <div class="dd dd-draghandle bordered form-horizontal">
                    <div class="form-group">
                        <label for="act_freenum_name" class="col-sm-3 control-label no-padding-right">活动免报名费次数名称</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" id="act_freenum_name" placeholder="Enter" value="{:C('act_freenum_name')}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="rent_freenum_name" class="col-sm-3 control-label no-padding-right">借阅免运费次数名称</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" id="rent_freenum_name" placeholder="Enter" value="{:C('rent_freenum_name')}"><br>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <a href="javascript:void(0);" class="btn btn-darkorange" onclick="save_name()">保存</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 模态框（Modal） -->
<div class="modal fade" id="modal-action" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"
                        aria-hidden="true">×
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    您真的确定要进行此操作吗？
                </h4>
            </div>
            <div class="modal-body danger">
                操作后将不可恢复
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary btn-ok">
                    确认操作
                </button>
                <button type="button" class="btn btn-default"
                        data-dismiss="modal">取消
                </button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div>
<script>

    function save_rent(){
        var $where={rentmax_wx:$('#rentmax_wx').val(),rentmax_md:$('#rentmax_md').val()};
        $.post('{:U("saveRent")}',$where,function(data){
            alert(data.data);
        },'json');
    }


    function save_name(){
        var $where={act_freenum_name:$('#act_freenum_name').val(),rent_freenum_name:$('#rent_freenum_name').val()};
        $.post('{:U("saveName")}',$where,function(data){
            alert(data.data);
        },'json');
    }

</script>